The Bichromatic Square and Rectangle Problems
نویسندگان
چکیده
We examine a variant of the maximum empty square (or rectangle) problem: Find an axis-aligned square (or rectangle) that contains as many blue points as possible without containing any red points. Let n be the total number of red and blue points. We solve the bichromatic square problem in O(n log n) time and O(n) space. We also solve the bichromatic rectangle problem in O(n log n) time and O(n log n) space.
منابع مشابه
Search Strategies for Rectangle Packing
Rectangle (square) packing problems involve packing all squares with sizes 1 × 1 to n × n into the minimum area enclosing rectangle (respectively, square). Rectangle packing is a variant of an important problem in a variety of real-world settings. For example, in electronic design automation, the packing of blocks into a circuit layout is essentially a rectangle packing problem. Rectangle packi...
متن کاملThe Bichromatic Rectangle Problem in High Dimensions
Given a set of blue points and a set of red points in ddimensional space, we show how to find an axis-aligned hyperrectangle that contains no red points and as many blue points as possible. Our algorithm enumerates the set of relevant hyperrectangles (inclusion maximal axisaligned hyperrectangles that do not contain a red point) and counts the number of blue points in each one. The runtime of o...
متن کاملHardness of approximation for orthogonal rectangle packing and covering problems
Bansal and Sviridenko [4] proved that there is no asymptotic PTAS for 2-dimensional Orthogonal Bin Packing (without rotations), unless P = NP. We show that similar approximation hardness results hold for several 2and 3-dimensional rectangle packing and covering problems even if rotations by ninety degrees are allowed. Moreover, for some of these problems we provide explicit lower bounds on asym...
متن کاملالگوریتم مستطیل آبشاری و ماتریس انتقال در شبکه های کوتاه ترین مسیر بادور
Shortest path problem is among the most interesting problems in the field of graph and network theory. There are many efficient matrix based algorithms for detecting of shortest path and distance between all pairs of this problem in literature. In this paper, a new exact algorithm, named Cascade Rectangle Algorithm, is presented by using main structure of previous exact algorithms and developin...
متن کاملدستهبندی دادههای دوردهای با ابرمستطیل موازی محورهای مختصات
One of the machine learning tasks is supervised learning. In supervised learning we infer a function from labeled training data. The goal of supervised learning algorithms is learning a good hypothesis that minimizes the sum of the errors. A wide range of supervised algorithms is available such as decision tress, SVM, and KNN methods. In this paper we focus on decision tree algorithms. When we ...
متن کامل